package com.efast.dmom.mgmt.controller.master;

import java.util.List;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.entity.master.TmBasProductionLine;
import com.efast.dmom.mgmt.service.master.TmBasProductionLineService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping(value="/tmBasProductionLine")
public class TmBasProductionLineController {
	@Autowired
	private TmBasProductionLineService tmBasProductionLineService;
	
	//获取所有产线
	@RequestMapping(value = "/getAllProLines")
	public @ResponseBody ResultBean getAllProLines(){
		ResultBean result=new ResultBean(true,"'");
		List<TmBasProductionLine> lineList = tmBasProductionLineService.selectTmBasProductionLine(null);
		if(lineList!=null&&lineList.size()>0) {
			result.setObject(lineList);
		}else {
			result.setSuccess(false);
			result.setMessage("系统还未配置产线。");
		}
		return result;
	}
}
